package com.tanhua.admin.task;

import com.tanhua.admin.service.AnalysisService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class AnalysisTask {

    @Autowired
    private AnalysisService analysisService;

    @Scheduled(cron = "0 52 17 * * ?")
    public void analyseByDay(){
        log.info("===================开始解析日志===================");
        analysisService.analyseByDay();
        log.info("===================解析日志结束===================");
    }
}
